﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WUCRegister.ascx.cs" Inherits="WebAppArtreve.views.shared.components.users.WUCRegister" %>
<div>
    <fieldset>
        <legend>Register</legend>

        <asp:ValidationSummary ID="ValidationSummary1"
            HeaderText="Some fields returned an error:"
            DisplayMode="BulletList"
            EnableClientScript="true"
            runat="server"/>

        <div class="formfield formfieldrequired">
            <asp:Label ID="lblNickname" 
                class="lblForm"
                runat="server" 
                Text="Nickname" 
                AssociatedControlID="txtNickname" />
            <asp:TextBox ID="txtNickname" class="input"
                runat="server" 
                MaxLength="50" 
                TextMode="SingleLine" Width="150px"/>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator0"
                ControlToValidate="txtNickname"
                Text="*"
                runat="server" />
        </div>
        
        <div class="formfield formfieldrequired">
            <asp:Label ID="lblFirstname" 
                class="lblForm"
                runat="server" 
                Text="First name" 
                AssociatedControlID="txtFirstname" />
            <asp:TextBox ID="txtFirstname" class="input"
                runat="server" 
                MaxLength="50" 
                TextMode="SingleLine" Width="150px"/>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                ControlToValidate="txtFirstname"
                Text="*"
                runat="server" />
        </div>

        <div class="formfield formfieldrequired">
            <asp:Label ID="lblGivenname" 
                class="lblForm"
                runat="server" 
                Text="Given name" 
                AssociatedControlID="txtGivenname" />
            <asp:TextBox ID="txtGivenname" class="input"
                runat="server" 
                MaxLength="50" 
                TextMode="SingleLine" Width="150px"/>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2"
                ControlToValidate="txtGivenname"
                Text="*"
                runat="server" />
        </div>

        <div class="formfield formfieldrequired">
            <asp:Label ID="lblEmail" 
                class="lblForm"
                runat="server" 
                Text="Email" 
                AssociatedControlID="txtEmail" />
            <asp:TextBox ID="txtEmail" class="input"
                runat="server" 
                MaxLength="50" 
                AutoComplete="Off"
                TextMode="SingleLine" Width="150px"/>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3"
                ControlToValidate="txtEmail"
                Text="*"
                runat="server" />
            <asp:RegularExpressionValidator ID="RegularExpressionValidator3"
                ControlToValidate="txtEmail"
                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                Text="Invalid email address"
                runat="server" />
        </div>

        <div class="formfield formfieldrequired">
            <asp:Label ID="lblPassword" 
                class="lblForm"
                runat="server" 
                Text="Password" 
                AssociatedControlID="txtPassword" />
            <asp:TextBox ID="txtPassword" class="input"
                runat="server"
                TextMode="Password"
                AutoComplete="Off"
                MaxLength="50" Width="150px"/>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4"
                ControlToValidate="txtPassword"
                Text="*"
                runat="server" />
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1"
                ControlToValidate="txtPassword"
                ValidationExpression="^([a-zA-Z0-9]{8,25})$"
                Text="Password should be between 8 and 25 characters, letters and numbers only."
                runat="server" />
        </div>

        <div class="formfield formfieldrequired">
            <asp:Label ID="lblRepeatPassword" 
                class="lblForm"
                runat="server" 
                Text="Password" 
                AssociatedControlID="txtRepeatPassword" />
            <asp:TextBox ID="txtRepeatPassword" class="input"
                runat="server"
                TextMode="Password"
                AutoComplete="Off"
                MaxLength="50" Width="150px"/>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator8"
                ControlToValidate="txtRepeatPassword"
                Text="*"
                runat="server" />
            <asp:CompareValidator ID="CompareValidator1"
                ControlToCompare="txtPassword" ControlToValidate="txtRepeatPassword"
                Text="Passwords do not match."
                runat="server" />
        </div>

        <div class="formfield formfieldrequired">
            <asp:Label ID="lblDob" 
                class="lblForm"
                runat="server" 
                Text="Date of birth" 
                AssociatedControlID="txtDob" />
            <asp:TextBox ID="txtDob" class="input"
                runat="server" 
                MaxLength="10" 
                TextMode="SingleLine" Width="150px"/>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5"
                ControlToValidate="txtDob"
                Text="*"
                runat="server" />
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2"
                ControlToValidate="txtDob"
                ValidationExpression="^(([0][1-9]|[12][0-9]|3[01])/(0[1-9]|1[012])/(19|20)[0-9]{2})$"
                Text="Invalid date (dd/mm/yyy)."
                runat="server" />
        </div>

        <div class="formfield formfieldrequired">
            <asp:Label ID="lblSecretquestion" 
                class="lblForm"
                runat="server" 
                Text="Secret question" 
                AssociatedControlID="ddlSecretQuestion" />
            <asp:DropDownList
                ID="ddlSecretQuestion" class="input"
                runat="server" DataSourceID="ODSSecretQuestions" DataTextField="Label" DataValueField="Id" />
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6"
                ControlToValidate="ddlSecretQuestion"
                Text="*"
                runat="server" />
        </div>

        <div class="formfield formfieldrequired">
            <asp:Label ID="lblSecretanswer" 
                class="lblForm"
                runat="server" 
                Text="Secret Answer" 
                AssociatedControlID="txtSecretanswer" />
            <asp:TextBox ID="txtSecretanswer" class="input"
                runat="server" 
                MaxLength="50" 
                TextMode="SingleLine" Width="150px"/>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator7"
                ControlToValidate="txtSecretanswer"
                Text="*"
                runat="server" />
        </div>

        <div class="formfield formfieldrequired">
            <asp:LinkButton ID="lnkBtnSave" CausesValidation="true" runat="server" 
                onclick="lnkBtnSave_Click">Save</asp:LinkButton>
            <asp:Label ID="txtStatus" runat="server" />
        </div>
    </fieldset>
</div>

<asp:ObjectDataSource ID="ODSSecretQuestions" 
    runat="server" 
    TypeName="CLibArtreve.bll.SecretQuestionBLL"  
    SelectMethod="GetAll" 
    onobjectcreating="ODSSecretQuestions_ObjectCreating"/>